package androidgames.networkgames.screens.components;

import android.app.Activity;
import android.inputmethodservice.KeyboardView.OnKeyboardActionListener;
import com.badlogic.androidgames.framework.Graphics;
import com.badlogic.androidgames.framework.Pixmap;
import com.badlogic.androidgames.framework.Input.TouchEvent;
import com.badlogic.androidgames.framework.Screen;

public class DrawableTextbox extends DrawableComponent implements OnKeyboardActionListener {
	
	public String strText;
	
	public DrawableTextbox(Screen screen, Pixmap background, int iWidth, int iHeight, int iX, int iY, int iSX, int iSY, String StrButtonText, int iTX, int iTY) {
		super(screen, background, iWidth, iHeight, iX, iY, iSX, iSY);
		// TODO Auto-generated constructor stub
	}
	
	public DrawableTextbox(Screen screen, int iBackgroundColor, int iWidth, int iHeight, int iX, int iY, int iSX, int iSY, String StrButtonText, int iTX, int iTY) {
		super(screen, iBackgroundColor, iWidth, iHeight, iX, iY, iSX, iSY);
		// TODO Auto-generated constructor stub
	}

	@Override
	public boolean update(float deltatime, TouchEvent touchevent) {
		// TODO Auto-generated method stub
		boolean isTouched = isTouched(touchevent.x, touchevent.y);
		if(isTouched) {
			final Activity game = (Activity)screen.getGame();
			game.runOnUiThread(new Runnable() {
				@Override
				public void run() {
					// TODO Auto-generated method stub
					
				}
			});
			return true;
		}
		return false;
	}

	@Override
	public void present(float deltatime, Graphics g) {
		// TODO Auto-generated method stub
		g.drawRect(iX, iY, iWidth, iHeight, iBackgroundColor);
	}

	@Override
	public void onKey(int primaryCode, int[] keyCodes) {
		// TODO Auto-generated method stub
	}

	@Override
	public void onPress(int primaryCode) {
		// TODO Auto-generated method stub
	}

	@Override
	public void onRelease(int primaryCode) {
		// TODO Auto-generated method stub
	}

	@Override
	public void onText(CharSequence text) {
		// TODO Auto-generated method stub
	}

	@Override
	public void swipeDown() {
		// TODO Auto-generated method stub
	}

	@Override
	public void swipeLeft() {
		// TODO Auto-generated method stub
	}

	@Override
	public void swipeRight() {
		// TODO Auto-generated method stub
	}

	@Override
	public void swipeUp() {
		// TODO Auto-generated method stub
	}
}
